package cn.bonoon.kernel.menus;

import java.util.Map;

import cn.bonoon.kernel.util.StringHelper;

/**
 * 菜单信息
 * 
 * @author jackson
 * 
 */
public class MenuInfo extends ItemInfo /* implements IMenuInfo */{

	public MenuInfo() {
	}

	public MenuInfo(int ordinal, String id, String name) {
		this.id = id;
		this.name = name;
		this.ordinal = ordinal;
	}

	protected ChannelInfo channel;

	@Override
	protected void init(IModuleContext context, IModuleInfo module, Map<String, ItemInfo> itemCached, String pid, String phref) {

		super.init(context, module, itemCached, pid, phref);
		
		if (StringHelper.isEmpty(href)) {
			href = "javascript:void(null);";
		}

	}

	public void button(StringBuilder a, String selected) {
		_button(href, a, selected);
	}

	@Override
	public ChannelInfo getChannel() {
		return channel;
	}

}
